package com.example.circular.alertdialog;

import android.app.Activity;
import android.app.AlertDialog;
import android.os.Bundle;
import android.view.Gravity;
import android.view.View;
import android.view.Window;

import com.example.circular.R;

public class MainActivity extends  Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		setContentView(R.layout.activity_main);
	
	}

	public void showDialog(View v){
		 AlertDialog.Builder builder = new AlertDialog.Builder(this);
		 AlertDialog dialog = builder.create();
		 dialog.show();
		 
		 Window window = dialog.getWindow();
		 window.setContentView(R.layout.dialog);
		 window.setGravity(Gravity.CENTER_HORIZONTAL|Gravity.CENTER_VERTICAL);
		 window.setLayout(300, 100);
	}
	
 
}
